/* eslint-disable */
// 核对浏览器是否支持flash
export const checkIsSupportFlash = function () {
  let version = -1
  if (window.ActiveXObject) {
    try {
      let swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')
      version = parseInt(swf.Getletiable('$version').split(' ')[1].split(',')[0])
    } catch (e) {
    }
  } else {
    if (navigator.plugins && navigator.plugins['Shockwave Flash']) {
      let arr = navigator.plugins['Shockwave Flash'].description.split(' ')
      let i = 0
      let length = arr.length
      if (arr) {
        for (; i < length; i++) {
          if (!isNaN(Number(arr[i]))) {
            version = Number(arr[i])
            break
          }
        }
      }
    }
  }
  return version !== -1
}
